package com.lanou3g.ptp.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel(description = "审批")
public class Approval implements Serializable {

    @ApiModelProperty(name = "审批id", hidden = true)
    private Long id;

    @ApiModelProperty(name = "学生id", hidden = true)
    private Long studentId;

    @ApiModelProperty("任务id")
    private Long taskId;

    @ApiModelProperty("请假类型(0:病假,1:事假)")
    private Integer type;

    @ApiModelProperty("请假理由")
    private String reason;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty("开始时间")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty("结束时间")
    private Date overTime;

    @ApiModelProperty("审批人名字")
    private String approvalName;

    @ApiModelProperty("审批时间")
    private Date approvalTime;

    @ApiModelProperty("申请资料照片地址")
    private String photo;

    @ApiModelProperty(name = "0(已提交) 1(同意) 2(拒绝)", hidden = true)
    private Integer status;

    @ApiModelProperty(name = "创建时间", hidden = true)
    private Date createTime;

    @ApiModelProperty(name = "更新时间", hidden = true)
    private Date updateTime;

    // -------------非表中字段------------

    @ApiModelProperty(name = "学生名字", hidden = true)
    // 请假的学生名字
    private String name;
    @ApiModelProperty(name = "学生手机号", hidden = true)
    private String tel;
    // 请假学生的班级名字
    @ApiModelProperty(name = "班级名字", hidden = true)
    private String clazz;
    @ApiModelProperty("任务名")
    private String taskName;




}
